@extends('layouts.admin.layout')

@section('content')
    <div class="admin-content-body">
        <div class="am-cf am-padding am-padding-bottom-0">
            <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">信用卡申请列表</strong> /
                <small>Card Apply</small>
            </div>
        </div>

        <hr>
        @include('layouts.admin._flash')
        <form action="{{url('admin/cardApply/index')}}" method="post">
            {!! csrf_field() !!}
            <div class="am-g">
                {{--<div class="am-u-sm-12 am-u-md-6">
                    <div class="am-btn-toolbar">
                        <div class="am-btn-group am-btn-group-xs">
                            <a href="{{route('auth.admin_create')}}" type="button" class="am-btn am-btn-default"><span
                                        class="am-icon-plus"></span> 新增</a>
                        </div>
                    </div>
                </div>--}}
                <div class="am-u-sm-12 am-u-md-3">

                    <input type="text" class="form-control" placeholder="请输入手机号" name="mobile"
                           value="{{ Request::input('mobile') }}">

                </div>
                <div class="am-u-sm-12 am-u-md-3">
                    <div class="am-form-group">
                        <select name="status">
                            <option value="" >请选择状态</option>
                                <option value="" ></option>
                        </select>
                    </div>
                </div>

                <div class="am-u-sm-12 am-u-md-3">
                    <div class="am-input-group am-input-group-sm">
                        <input type="text" class="am-form-field" placeholder="请输入姓名" name="name"
                               value="{{ Request::input('name') }}">
                        <span class="am-input-group-btn">
            <button class="am-btn am-btn-default" type="submit">搜索</button>
          </span>
                    </div>
                </div>
            </div>
        </form>
        <div class="am-g">
            <div class="am-u-sm-12">
                <form class="am-form">
                    <table class="am-table am-table-striped am-table-hover table-main">
                        <thead>
                        <tr>
                            <th class="table-id">ID</th>
                            <th class="table-title">姓名</th>
                            <th class="table-title">手机</th>
                            <th class="table-type">创建时间</th>
                            <th class="table-type">银行</th>
                            <th class="table-type">状态</th>
                            <th class="table-set">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        @foreach($records as $record)
                            <tr>
                                <td>{{$record->id}}</td>
                                <td>{{$record->name}}</td>
                                <td>{{$record->mobile}}</td>
                                <td>{{$record->create_time}}</td>
                                <td>{{$record->cardname}}</td>
                                <td class="am-hide-sm-only">{{$record->status}}</td>
                                <td>
                                    <div class="am-btn-toolbar">
                                        <div class="am-btn-group am-btn-group-xs">
                                            <a href="{{--{{route('auth.admin_edit', $admin->id)}}--}}"
                                               class="am-btn am-btn-default am-btn-xs am-text-secondary"><span
                                                        class="am-icon-pencil-square-o"></span> 编辑</a>
                                            <a href="" data-method="delete"
                                               data-token="{{csrf_token()}}" data-confirm="确定删除吗?"
                                               class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only">
                                                <span class="am-icon-trash-o"></span> 删除
                                            </a>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        @endforeach
                        </tbody>
                    </table>
                    <div class="am-cf">
                        共 {{$records->total()}} 条记录
                        <div class="am-fr">
                            {{-- <ul class="am-pagination">
                                 <li class="am-disabled"><a href="#">«</a></li>
                                 <li class="am-active"><a href="#">1</a></li>
                                 <li><a href="#">2</a></li>
                                 <li><a href="#">3</a></li>
                                 <li><a href="#">4</a></li>
                                 <li><a href="#">5</a></li>
                                 <li><a href="#">»</a></li>
                             </ul>--}}
                            {{--{{ $brands->links() }}--}}
                            {!! $records->appends(Request::all())->links() !!}
                        </div>
                    </div>
                    <hr/>
                    <p>注：.....</p>
                </form>
            </div>

        </div>
    </div>
@endsection